-
Notifications
You must be signed in to change notification settings - Fork 25k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consolidate validation for 'docvalue_fields'. #59473
Conversation
This improves modularity and also fixes some issues when `docvalues_fields` is used within `inner_hits` or the `top_hits` agg: * We previously didn't resolve wildcards in field names. * We also forgot to enforce the limit `index.max_docvalue_fields_search`.
Pinging @elastic/es-search (:Search/Search) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks @cbuescher for the review. This is technically breaking, since we now enforce the |
As far as I understand the PR this would be limited to using "doc_values" in Top Hits Aggregation and inner hits queries? And the now enforced 100 field limit would probably only be hit when using some sort of wildcard there and there are a huge number of fields? As far as I'm concerned this should already have triggered an error (I think we fact that we didn't check the limit until now can be considered a bug), so I wouldn't be opposed to backporting to 7.9, maybe adding a note to the changes doc for the cautious. I did a bit of searching in the forums and other support resources where users so far ran into the existing limit, one was in SQL but should be fixed (#44062), and the main problem seems to be this open Kibana issue (elastic/kibana#22897), but that one is concerned with the limit we already check. What's your thoughts on this? |
This is a good point, it's unlikely that a user would have exceeded the limit if wildcards weren't even supported. I also feel like it makes sense to treat this as a 'bug' and backport to 7.9. (Update: this actually turned out to be 7.10). |
This improves modularity and also fixes some issues when `docvalues_fields` is used within `inner_hits` or the `top_hits` agg: * We previously didn't resolve wildcards in field names. * We also forgot to enforce the limit `index.max_docvalue_fields_search`.
This improves modularity and also fixes some issues when
docvalue_fields
isused within
inner_hits
or thetop_hits
agg:index.max_docvalue_fields_search
.